<%@page import="com.training.java.redbox.domain.Movie"%>
<%@page import="com.training.java.redbox.domain.Customer"%>
<%@page import="com.training.java.redbox.domain.Orders"%>
<%@page import="java.util.List"%>

<%@page import="com.training.java.redbox.domain.Orders"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>


<%@include file="Header.jsp"%><br/><br/>
<h2> <center>please find your order details <center> </h2>

<h3> customer details </h3>
NAME :
<%
out.write(customer.getFirstName());
	
%><br/><br/>
ADDRESS :
<%
out.write(customer.getAddress());
	
%>

<h3> order  details </h3>
<%
Orders order = (Orders)request.getAttribute("Orders");
long num =  order.getOrder_num();
	
%>
Order Number : <%= num %><br/>

<%
List<Movie> movies = (List<Movie>)session.getAttribute("MoviesCart");
	double price = 0.0;
	for(Movie movie : movies)
	{%>
	
	
	title : <%= movie.getTitle()%><br/>
	type : <%= movie.getType()%><br/>
	<%   price += movie.getRentalPrice(); %><br/>
	<%}
	
	%>
	
		Total price  : <%= price %><br/>	 
	

	
	<h2> <center>THANK YOU <center> </h2>

<%@include file="Footer.jsp"%>

</body>
</html>